{% extends "admin/change_list.html" %}
{% load i18n %}

{% block content %}
    <div id="content-main">

        {% if request.POST %}
            <p class="errornote">{% trans "Please correct the errors below." %}</p>
            {{ settings_form.non_field_errors }}
        {% endif %}

        <form method="post" class="change-form" id="settings-form">
            {% csrf_token %}
            {% for field in settings_form %}
                {% ifchanged field.group %}
                    {% if not forloop.first %}
                        </div>
                    {% endif %}
                    <div class="module">
                    <h2>{% if field.group == "Smtp" %}邮件服务器
                        {% else %}{% trans field.group %}
                    {% endif %}
                    </h2>
                {% endifchanged %}
            <p>
                {{ field.label_tag }}{{ field }}{{ field.errors }}
                <span class="help">{{ field.help_text }}</span>
            </p>
            {% if forloop.last %}
                </div>
            {% endif %}
            {% endfor %}
    <div class="submit-row">
        <input type="submit" class="default" value="{% trans "Save" %}"/>
    </div>
    </form>

    </div>
{% endblock %}
